package com.ynny.practice2;


import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserTest {
public static void main(String[] args){
        ClassPathXmlApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("user.xml");
        User bean = applicationContext.getBean("user", User.class);
        bean.show();
        User bean1 = applicationContext.getBean("user1", User.class);
        bean1.show();
        System.out.println(bean1);
        System.out.println(bean);

    }
}
